﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/MasterPage.master" AutoEventWireup="true"
    CodeFile="Profile.aspx.cs" Inherits="Pages_Store_Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
     <center>
    <div>
        <asp:LinkButton ID="GoToUserInfo" runat="server"  OnClick="GoToUserInfo_Click"><b>Date Utilizator</b></asp:LinkButton>
        &nbsp;
        <asp:LinkButton ID="gotoIstoric" runat="server" onclick="gotoIstoric_Click"><b>Istoric Comenzi</b></asp:LinkButton>
&nbsp;<asp:LinkButton ID="GoToPassChange" runat="server"  OnClick="GoToPassChange_Click"><b>Schimba parola</b></asp:LinkButton>
    </div>
    <hr />
    <br />
    <asp:MultiView ID="UserProfile" runat="server" ActiveViewIndex="0" 
             onactiveviewchanged="UserProfile_ActiveViewChanged">
        <asp:View ID="UserInfo" runat="server">
            <div >
                <div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Nume:</strong></label>
                        <asp:TextBox ID="txtFirst_Name" runat="server"></asp:TextBox>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Prenume:</strong></label>
                        <asp:TextBox ID="txtLast_Name" runat="server"></asp:TextBox>
                    </div>
                      <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Email:</strong></label>
                        <asp:TextBox ID="txtemail" runat="server"></asp:TextBox>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Adresa:</strong></label>
                        <asp:TextBox ID="txtAdress" runat="server"></asp:TextBox>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Judet: </strong>
                        </label>
                        <asp:TextBox ID="txtJudet" runat="server"></asp:TextBox>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Oras:</strong></label>
                        <asp:TextBox ID="txtRegion" runat="server"></asp:TextBox>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Cod Postal:</strong></label>
                        <asp:TextBox ID="txtPostalCode" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="CodulPostal trebuie sa fie format din cifre"
                            Display="Static" CssClass="fieldRequired" ControlToValidate="txtPostalCode" ValidationGroup="CreateUserWizard"
                            ValidationExpression="\d{6}" ToolTip="CodulPostal trebuie sa fie format din cifre">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Telefon Fix:</strong></label>
                        <asp:TextBox ID="txtLandline" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="TelRegularExpressionValidator1" runat="server"
                            ErrorMessage="Numarul de telefon trebuie sa fie format din 10 cifre(ex: xxxx xxxxxx)"
                            Display="Static" CssClass="fieldRequired" ControlToValidate="txtLandline" ValidationGroup="CreateUserWizard"
                            ValidationExpression="\d{4}(-|\s)\d{6}" ToolTip="Numarul de telefon trebuie sa fie format din cifre">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Telefon Mobil:</strong></label>
                        <asp:TextBox ID="txtMobilePhone" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Numarul de telefon trebuie sa fie format din 10 cifre(ex: xxxx xxxxxx)"
                            Display="Static" CssClass="fieldRequired" ControlToValidate="txtMobilePhone"
                            ValidationGroup="CreateUserWizard" ValidationExpression="\d{4}(-|\s)\d{6}" ToolTip="Numarul de telefon trebuie sa fie format din cifre">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Cetatenie</strong></label>
                        <asp:DropDownList ID="ddlCetatenie" runat="server">
                            <asp:ListItem Value="Romana">Romana</asp:ListItem>
                            <asp:ListItem Value="Alta">Alta</asp:ListItem>
                        </asp:DropDownList>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>CNP: </strong>
                        </label>
                        <asp:TextBox ID="txtCNP" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="Codul Numeric Personal trebui sa fie format din 13 cifre"
                            ControlToValidate="txtCNP" ValidationExpression="\d{13}" CssClass="fieldRequired"
                            ToolTip="Codul Numeric Personal trebui sa fie format din 13 cifre">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Seria si Numarul:</strong></label>
                        <asp:TextBox ID="txtSeriaSiNumaru" runat="server"></asp:TextBox>
                    </div>
                    <div class="form_row">
                        <label class="contact" style="width: 100px;">
                            <strong>Eliberat de:</strong></label>
                        <asp:TextBox ID="txtEliberatDe" runat="server"></asp:TextBox>
                    </div>
                    <div class="form_row">
                        <asp:Button ID="Update" runat="server" Text="Modifica" OnClick="Update_Click" />
                    </div>
                </div>
            </div>
        </asp:View>
        <asp:View ID="istoricComenzi" runat="server">
        <table style="width: 100%;">
                    <tr>
                        <td style="width: 14%">
                            <b>ID Comanda</b>
                        </td>
                        <td style="width: 14%">
                            <b>Adresa de livrare</b>
                        </td>
                        <td style="width: 14%">
                            <b>Adresa de facturare</b>
                        </td>
                        <td style="width: 14%">
                            <b>Cantitate</b>
                        </td>
                        <td style="width: 14%">
                            <b>Creata</b>
                        </td>
                        <td style="width: 14%">
                          <b>Status</b>
                        </td>
                        <td style="width: 16%">
                           <b>Data livrare</b>
                        </td>
                    </tr>                    
                </table>
            <asp:ListView ID="ListView1" runat="server">
            <ItemTemplate>
                <table style="width: 100%;">
                    <tr>
                        <td style="width: 14%">
                            <%# DataBinder.Eval(Container.DataItem, "ID")%>
                        </td>
                        <td style="width: 14%">
                            <%# DataBinder.Eval(Container.DataItem, "shipping_address")%>
                        </td>
                        <td style="width: 14%">
                            <%# DataBinder.Eval(Container.DataItem, "billing_address")%>
                        </td>
                        <td style="width: 14%">
                            <%# DataBinder.Eval(Container.DataItem, "amount")%>
                        </td>
                        <td style="width: 14%">
                            <%# DataBinder.Eval(Container.DataItem, "created_at")%>
                        </td>
                        <td style="width: 14%">
                            <%# DataBinder.Eval(Container.DataItem, "status")%>
                        </td>
                        <td style="width: 14%">
                            <%# DataBinder.Eval(Container.DataItem, "shiping_date")%>
                        </td>
                    </tr>                    
                </table>
            </ItemTemplate>
            </asp:ListView>
        </asp:View>
        <asp:View ID="PassChange" runat="server">
            <asp:ChangePassword ID="UserChangePassword" runat="server" 
                ChangePasswordButtonText="Schimba" 
                ChangePasswordFailureText="Parol&#259; incorect&#259; sau Noua parola invalida. Noua parola trebuie sa aiba minim lungime: {0}. Caracterele non-alfanumerice necesare: {1}."
                ChangePasswordTitleText="Schimba Parola" 
                ConfirmNewPasswordLabelText="Confirma noua parola:"
                ConfirmPasswordCompareErrorMessage="Noua parola si confirmarea ei nu conincid."
                ConfirmPasswordRequiredErrorMessage="Confirmarea parolei este necesara." 
                ContinueButtonText="Continua"
                NewPasswordLabelText="Parola noua:" 
                NewPasswordRegularExpressionErrorMessage="Introdu o alta parola"
                NewPasswordRequiredErrorMessage="Trebuie sa introduci o parola." 
                PasswordLabelText="Parola curenta"
                PasswordRequiredErrorMessage="Trebuie sa introduci parola curenta." 
                SuccessText="Parola a fost schimbata!"
                SuccessTitleText="Schimbarea parolei sa terminat cu succes" 
                UserNameLabelText="Nume de utilizator:"
                UserNameRequiredErrorMessage="Nume de utilizator necesar." >
                <ChangePasswordTemplate>
                    <table cellpadding="1" cellspacing="0" style="border-collapse: collapse;">
                        <tr>
                            <td>
                                <table cellpadding="0">
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword"
                                                Style="font-weight: 700">Parola curenta</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
                                                CssClass="fieldRequired" ErrorMessage="Trebuie sa introduci parola curenta."
                                                ToolTip="Trebuie sa introduci parola curenta." ValidationGroup="UserChangePassword">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword"
                                                Style="font-weight: 700">Parola noua:</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="NewPassword" runat="server" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
                                                CssClass="fieldRequired" ErrorMessage="Trebuie sa introduci o parola." ToolTip="Trebuie sa introduci o parola."
                                                ValidationGroup="UserChangePassword">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword"
                                                Style="font-weight: 700">Confirma noua parola:</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
                                                CssClass="fieldRequired" ErrorMessage="Confirmarea parolei este necesara." ToolTip="Confirmarea parolei este necesara."
                                                ValidationGroup="UserChangePassword">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2">
                                            <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword"
                                                ControlToValidate="ConfirmNewPassword" Display="Dynamic" ErrorMessage="Noua parola si confirmarea ei nu conincid."
                                                Style="font-weight: 700" ValidationGroup="UserChangePassword"></asp:CompareValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2" style="color: Red; font-weight: 700;">
                                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" colspan="2">
                                            <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword"
                                                Text="Schimba" ValidationGroup="UserChangePassword" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </ChangePasswordTemplate>
                <SuccessTemplate>
                    <table cellpadding="1" cellspacing="0" style="border-collapse: collapse;">
                        <tr>
                            <td>
                                <table cellpadding="0">
                                    <tr>
                                        <td>
                                            <strong>Schimbarea parolei sa terminat cu succes</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center">
                                            <strong>Parola a fost schimbata!</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Button ID="ContinuePushButton" runat="server" 
                                                CausesValidation="False" 
                                                CommandName="Continue"
                                                Text="Continua" 
                                                onclick="ContinuePushButton_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </SuccessTemplate>
            </asp:ChangePassword>
        </asp:View>
    </asp:MultiView>
    </center>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="RightContent" runat="Server" >
</asp:Content>
